<template>
    <div>
        <h1>首页</h1>
    </div>
</template>
<script>
    export default {
        beforeRouteEnter:function(to,from,next){
            console.log("进路由之前");
            next();
        },
        beforeRouteUpdate:function(to,from,next){
            console.log("复用了");
            next();
        },
        beforeRouteLeave:function(to,from,next){
            console.log("离开路由;去另外一个地方："+to.path);
            next();
        }

    }
</script>
<style scoped>

</style>